home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / TPWENG / RECUPDAT.PAS < prev    next >
Pascal/Delphi Source File  |  1991-07-22  |  606b  |  29 lines

  1. program RecUpdat;
  2. uses PXEngine, WinCrt;
  3.  
  4. const TableName = 'Table';
  5.  
  6. var   PxErr: Integer;
  7.       TblHandle: TableHandle;
  8.       RecHandle: RecordHandle;
  9.  
  10. procedure PX(Code : integer);
  11. begin
  12.   writeln(PXErrMsg(Code));
  13. end;
  14.  
  15. begin
  16.   PX(PXWinInit('MyApp', pxShared));
  17.   PX(PXTblOpen(TableName, TblHandle, 0, False));
  18.   PX(PXRecBufOpen(TblHandle, RecHandle));
  19.  
  20.   (* Update the current record *)
  21.   PxErr := PXRecUpdate(RecHandle, TblHandle);
  22.   if PxErr <> PxSuccess then
  23.     Writeln(PxErrMsg(PxErr));
  24.  
  25.   PX(PXRecBufClose(RecHandle));
  26.   PX(PXTblClose(TblHandle));
  27.   PX(PXExit);
  28. end.
  29.